﻿using System;
using System.Collections.Generic;
using System.Drawing;
using TimeLineDataContract;

namespace TimeLineControl
{
    [Serializable]
    public static class DataConfigTimeLine
    {
        static DataConfigTimeLine()
        {
            RestoreDefaultValues();
        }
        public  static void RestoreDefaultValues()
        {
            //Default values
            TotalTimeLine = new TimeSpan();
            AlertTextColor = Color.Black;
            AlertBackGroundColor = Color.Yellow;
            FormBackGroundColor = Color.LightGray;
            FormTextColorInboundColor = Color.Black;
            ProgressBarInboundColor = Color.Green;
            ProgressBarOutboundColorNeg = Color.Red;
            ProgressBarOutboundColorPos = Color.Lime;
            AlertTime1 = new TimeSpan(0, 10, 0);
            AlertTime2 = new TimeSpan(0, 20, 0);
            AlertTime3 = new TimeSpan(0, 30, 0);
            AlertTime4 = new TimeSpan(0, 40, 0);
            AlertTime5 = new TimeSpan(0, 50, 0);
            MsgAlertTime1 = string.Format(ScreenUtil.StringResource("MsgDefaultAlert"), AlertTime1.TotalMinutes);
            MsgAlertTime2 = string.Format(ScreenUtil.StringResource("MsgDefaultAlert"), AlertTime2.TotalMinutes);
            MsgAlertTime3 = string.Format(ScreenUtil.StringResource("MsgDefaultAlert"), AlertTime3.TotalMinutes);
            MsgAlertTime4 = string.Format(ScreenUtil.StringResource("MsgDefaultAlert"), AlertTime4.TotalMinutes);
            MsgAlertTime5 = string.Format(ScreenUtil.StringResource("MsgDefaultAlert"), AlertTime5.TotalMinutes);
            PowerPointPipeName = "TimeLinePowerPoint";
            PowerPointApplication = string.Empty;
            PowerPointConnected = false;
            PowerPointPolling = 5;
            SlidesDesk = new SlideDeskContract[] { };
            CurrentSlide = null;
            TimeLineBarVisibled = false;
            ShowUpdatePowerPoint = true;
            LastNamePresentationRun = new List<string>();
            LastFullPathPresentationRun = new List<string>();
            AlignBar = DockWindows.Top;
        }

        public static bool TimeLineBarVisibled { get; set; }
        
        public static string PowerPointPipeName { get; set; }
        public static string PowerPointApplication { get; set; }
        public static bool PowerPointConnected { get; set; }
        public static int PowerPointPolling { get; set; }
        public static bool ShowUpdatePowerPoint { get; set; }

        public static SlideDeskContract[] SlidesDesk { get; set; }
        public static SlideDeskContract CurrentSlide { get; set; }

        public static TimeSpan TotalTimeLine { get; set; }
        public static Color FormBackGroundColor { get; set; }
        public static Color FormTextColorInboundColor { get; set; }
        public static Color ProgressBarInboundColor { get; set; }
        public static Color ProgressBarOutboundColorNeg { get; set; }
        public static Color ProgressBarOutboundColorPos { get; set; }

        public static Color AlertBackGroundColor { get; set; }
        public static Color AlertTextColor { get; set; }

        public static TimeSpan AlertTime1 { get; set; }
        public static TimeSpan AlertTime2 { get; set; }
        public static TimeSpan AlertTime3 { get; set; }
        public static TimeSpan AlertTime4 { get; set; }
        public static TimeSpan AlertTime5 { get; set; }
        public static string MsgAlertTime1 { get; set; }
        public static string MsgAlertTime2 { get; set; }
        public static string MsgAlertTime3 { get; set; }
        public static string MsgAlertTime4 { get; set; }
        public static string MsgAlertTime5 { get; set; }

        public static List<string> LastNamePresentationRun { get; set; }
        public static List<string> LastFullPathPresentationRun { get; set; }

        public static DockWindows AlignBar { get; set; }
        public static bool FullScreen { get; set; }
    }
}
